<?php if (!isset($question)) header('Location: '.Utility::getSiteUrl().'/testing/index'); ?>
<center><a href="<?php echo Utility::getSiteUrl(); ?>/testing/overview/<?php echo $classID; ?>">(Xem toàn bộ các câu hỏi)</a></center>
<div id="main" style="position:relative; left:30px;">
    <br /><br />
    <form name='testing' id='testing' action='<?php echo Utility::getSiteUrl(); ?>/testing/submit' method='post'>
    <input type='hidden' name='number' id='number' value='<?php echo $number+1; ?>'>
    <input type='hidden' name='classid' id='classid' value='<?php echo $classID; ?>'>
    <input type='hidden' name='questionid' id='questionid' value='<?php echo $question->id; ?>'>

    <u>Câu <?php echo $number; ?>:</u> <?php echo $question->content; ?>
    <br /><br />
    <?php foreach ($question->optionArr as $option)
            { if ($option->id == $question->choice){ ?>
                <input id='choice' name='choice' type="radio" value='<?php echo $option->id; ?>'
                        checked="checked">
            <?php } else {  ?>
                <input id='choice' name='choice' type="radio" value='<?php echo $option->id; ?>' >
            <?php } echo $option->content;?>
            <br />
    <?php   }
    ?>
        <br />
        <button id='prev' class='art-button' style='width: 100px; text-align: center;'
                onclick="document.getElementById('number').value = document.getElementById('number').value - 2;
                document.getElementById('testing').submit();">Câu trước</button>
    <input type='submit' name='submit' id='submit' class='art-button' value='Câu tiếp theo' style='width: 100px; text-align: center;'>
    </form>
</div>